package com.xframe.domain.e3sp.basedata;

import com.xframe.domain.BaseModel;
import com.xframe.domain.sys.SysValueDetail;
import com.xframe.xdal.core.annotation.*;
import com.xframe.xdal.core.constant.AutoFillType;
import lombok.Data;
import lombok.experimental.Accessors;

/**
 * @Description: 零件清单
 * @ClassName: com.xframe.domain.e3sp.basedata.PartsList
 * @Author: lmx
 * @CreateTime: 2024/01/02
 **/
@Data
@Accessors(chain=true)
@XTable(value = "v_parts_all_related", label = "零件清单",tableType = TableType.View)
@XSelectItem(keyName = "partId",codeName = "partNo",textName = "nameCn")
@XSelectItem(keyName = "partId",codeName = "partNo",textName = "nameEn",language = "en")
@XBelongsTo(typeName = "com.xframe.domain.sys.SysValueDetail",foreignKey = "unit", targetKey = "val",refTableAddString = "val_code = 'unitOfMeasurement'",as = "refUnit")
//@XBelongsTo(typeName = "com.xframe.domain.e3sp.basedata.Dc",foreignKey = "dcId", targetKey = "dcId",as = "refBrand")
//@XBelongsTo(typeName = "com.xframe.domain.e3sp.basedata.Pc",foreignKey = "brandId", targetKey = "brandId",as = "refBrand")
//@XBelongsTo(typeName = "com.xframe.domain.e3sp.basedata.Sc",foreignKey = "brandId", targetKey = "brandId",as = "refBrand")
//@XBelongsTo(typeName = "com.xframe.domain.e3sp.basedata.PartCategory",foreignKey = "brandId", targetKey = "brandId",as = "refBrand")



public class PartsList extends BaseModel {

    /**
     * 零件ID
     */
    @AutoFill(AutoFillType.Snowflake)
    @XColumn(name = "part_id", primaryKeyFlag = true,desc = "零件ID")
    private Long partId;

    /**
     * PCID
     */
    @XColumn(name = "pc_id",desc = "PCID")
    private Long pcId;

    /**
     * 零件号
     */
    @XQueryCondition
    @XColumn(name = "part_no", uniqueFlag = true,desc = "零件号",length = 100)
    private String partNo;

    /**
     * 中文名称
     */
    @XQueryCondition
    @XColumn(name = "name_cn",desc = "中文名称",length = 200)
    private String nameCn;

    /**
     * 英文名称
     */
    @XQueryCondition
    @XColumn(name = "name_en", desc = "英文名称",length = 200,nullFlag = true)
    private String nameEn;

    /**
     * 发文号
     */
    @XColumn(name = "doc_no", desc = "发文号",length = 100,nullFlag = true)
    private String docNo;

    /**
     * 计量单位
     */
    @XColumn(name = "unit", desc = "计量单位",length = 20,nullFlag = true)
    private String unit;

    /**
     * SCID
     */
    @XColumn(name = "sc_id",desc = "SCID")
    private Long scId;

    /**
     * 关键部件
     */
    @XQueryCondition
    @XColumn(name = "key_com", desc = "关键部件",nullFlag = true)
    private String keyCom;

    /**
     * 外部零件号
     */
    @XColumn(name = "externa_no", desc = "外部零件号",length = 500,nullFlag = true)
    private String externaNo;

    /**
     * 备注
     */
    @XColumn(name = "remark",desc = "备注",length = 500,nullFlag = true)
    private String remark;

    /**
     * 计量单位
     */
    @XColumn(name = "unit_name", desc = "计量单位",length = 100)
    private String unitName;


    /**
     * PC
     */
    @XQueryCondition
    @XColumn(name = "pc", desc = "PC",length = 100)
    private String pc;

    /**
     * PC中文名称
     */
    @XColumn(name = "pc_name_cn",desc = "PC中文名称",length = 200)
    private String pcNameCn;

    /**
     * PC英文名称
     */
    @XColumn(name = "pc_name_en",desc = "PC英文名称",length = 200,nullFlag = true)
    private String pcNameEn;




    /**
     * DC
     */
    @XQueryCondition
    @XColumn(name = "dc",desc = "DC",length = 100,nullFlag = true)
    private String dc;

    /**
     * DC中文名称
     */
    @XColumn(name = "dc_name_cn",desc = "DC中文名称",length = 200,nullFlag = true)
    private String dcNameCn;

    /**
     * DC英文名称
     */
    @XColumn(name = "dc_name_en",desc = "DC英文名称",length = 200,nullFlag = true)
    private String dcNameEn;



    /**
     * SC
     */
    @XQueryCondition
    @XColumn(name = "sc",desc = "SC",length = 100,nullFlag = true)
    private String sc;

    /**
     * SC中文名称
     */
    @XColumn(name = "sc_name_cn",desc = "SC中文名称",length = 200,nullFlag = true)
    private String scNameCn;

    /**
     * SC英文名称
     */
    @XColumn(name = "sc_name_en",desc = "SC英文名称",length = 200,nullFlag = true)
    private String scNameEn;

    /**
     * CLASS编码
     */
    @XColumn(name = "class_code",desc = "CLASS编码",length = 100,nullFlag = true)
    private String classCode;

    /**
     * CLASS中文名称
     */
    @XColumn(name = "class_name_cn",desc = "CLASS中文名称",length = 200,nullFlag = true)
    private String classNameCn;

    /**
     * CLASS英文名称
     */
    @XColumn(name = "class_name_en",desc = "CLASS英文名称",length = 200,nullFlag = true)
    private String classNameEn;

    /**
     * 备件类别编码
     */
    @XQueryCondition
    @XColumn(name = "category_code",desc = "备件类别编码",length = 200,nullFlag = true)
    private String categoryCode;

    /**
     * 备件类别名称
     */
    @XColumn(name = "category_name",desc = "备件类别名称",length = 200,nullFlag = true)
    private String categoryName;

}
